// dlg.txt

//MK Edit
//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 54;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "The cave passage has been sloping upward for some time, sometimes very steeply. You are close to the surface. This crumbling ruin must be the gateway.";
	text2 = "It is very hot and humid. The gateway must be built on a volcanic vent. The huge stone blocks making up the walls and ceiling are worn and crumbled. There are no hints of who the ancients who built this were, but it was built to last.";
	text3 = "It is also occupied. Recently-shed lizard scales, as large as shields, line the corridor. The floor is marked with countless large scratches, left by massive claws. Under the stink of sulfur, you detect a deep musk. The scent of a massive beast, mixed with the stink of rot.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "There is a huge hall to the north. Even from this distance, you can see what is waiting for you there: an enormous red dragon. It watches you come, and it is entirely irritated.";
	text2 = "These solitary, unpredictable beasts are found in the most remote, dangerous lands. There were several on Sacramentum, for example. They are not automatically hunted down. Their power and knowledge can be very useful to Haven, though it always comes at a price.";
	text3 = "Of course, dragons are also proud and greedy. Sometimes, they do attack Havenites. When they do, they must be put down.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "To the south, you see a massive cavern, dug out of the living rock by the dragon's enormous claws. It gets hotter with every step you take. In the distance, you see a gate, placed to protect the beast's hoard.";
	text2 = "The dragon's lair is ahead. She would doubtless prefer to sleep out of the way. The exit from this ruin is likely not this way.";
	code =
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "__";
	code =
		sf(this_town,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "__";
	code =
		sf(this_town,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "Droth'Nrah stops attacking for a moment. She takes a step backward and mumbles a few words. A spell. The air shimmers with released power.";
	text2 = "Then things calm down. You check your body, making sure that all of your parts are intact. Seems fine. Seems like the spell changed nothing at all.";
	text3 = "Then you look at the dragon. She looks different. Vacant. Distracted. Slightly translucent.";
	code =
		set_dialogue_pic(836); //dragon
	break;
	
begintalknode;
	tag = 14;
	condition = 1;
	text1 = "You strike the massive dragon a mighty blow, and she ... pops. Like a big soap bubble. She was an illusion, which has now vanished.";
	text2 = "A deep chuckle echoes through the stone corridors. The dragon laughing.";
	text3 = "Your route to the eastern exit is now free.";
	code =
		set_dialogue_pic(836); //dragon
		if (gf(54,12) > 0)
			rs(2);
	break;
	
begintalknode;
	tag = 15;
	condition = 1;
	text1 = "Droth'Nrah was irritated before. Now she is furious. _I go out of my way to cheat my deal with the Ro! To let you past! Now you attack me here? In my lair? You fool. Your mother will find your bones, after they have passed through me!_";
	text2 = "_I have had centuries here to prepare. Now enjoy my magic!_ She mutters a spell.";
	text3 = "A shade appears on a nearby platform. A ghost. No, not a ghost. It's not a dead person. Instead, it looks just like you, only translucent and mindless. Whatever it is, it's unstable. It starts to fade the moment it fully exists.";
	text4 = "It begins to walk, slowly, toward the living human that shares its likeness.";
	code =
		set_dialogue_pic(836); //dragon
	break;

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "You strike the dragon with a mortal blow. It takes her a moment to realize what happened. Then a moment more to believe it. Her body shudders.";
	text2 = "_I wasss a fool. All these yearsss, not angering Haven. Then I stay behind, just to protect my hoard._ She collapses.";
	text3 = "_Truly our flaw,_ she gasps, as blood sprays out of her mouth. _So mighty and wise, and then die for ... for gold ... for ..._";
	text4 = "And then she is dead.";
	code =
		set_dialogue_pic(836); //dragon
	break;
	

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "Your shadowy doppelganger gets close to its target. It lurches forward and touches you.";
	text2 = "You feel an icy sensation in your fingers and toes. It rapidly spreads through your body. Soon, it reaches your heart.";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "The massive gates of this hall are securely locked. You are unable to find a way in.";
	text2 = "Someone has left a note at the base of the gate. Your name is at the top. You pick it up and read it. It says:";
	text3 = "_This is the true path, but you are not ready. When Raasa Suharum has submitted and offered his thoughts to you, then it will be time to speak honestly._";
	text4 = "Below these words are a small, crude drawing of a wolf.";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "The enormous dragon looks down upon you with great irritation. She lets out an angry sigh, heating up the already sweltering hall and making you choke on sulfurous smoke.";
	text2 = "_I know you, human. You are [N], [P] of Haven. I stay informed about eventsss on my mountain, and I knew you wandered. I did not think you would get so lossst asss to visit me._";
	text3 = "_I am Dhoth'Nrah, lady of fire and the mountain. You wish to travel through my gate. I am bound to stop you._";
	text5 = "Dhoth'Nrah looks down at you, angrily pondering how to solve the problem of your arrival. Sometimes, she scrapes at an ancient paving stone with a long claw. Her imposing presence is starting to tell on you. You sweat nervously.";
	action = INTRO;
	code =
		sf(54,21,1);
		set_dialogue_pic(836); //dragon
	break;
	
begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_I would like to know more about you, dragon._";
	text1 = "_Thisss isss not a time for ssstudy, human. War comesss. Still, I will be polite. If you really care, you should go home and bother Haven'sss sagesss._";

begintalknode;
	state = 11;
	nextstate = 13;
	condition = 1;
	question = "_How long have you lived here?_";
	text1 = "_Three hundred yearsss. I claimed this hall from shadesss and pestsss when I came to my full power. I have easily held it since._";
	text2 = "_I have the full strength of my kind. I raised three clutchesss of eggsss. Several full dragonsss have flown from here, leaving me to care for my uselessss offspring._";
	
begintalknode;
	state = 13;
	nextstate = 11;
	condition = 1;
	question = "_Useless offspring?_";
	text1 = "_The young dragon'sss body is frail. It can't alwaysss contain the full power of our kind. If it is weak and twisted, it staysss home and livesss off the parent, until some wandering adventurer slaysss it and endsss itsss shame._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Do you serve the Rokaj?_";
	text1 = "The dragon laughs, and the floor shakes. _Them? They are too confused and divided to ever threaten me. I traded with them before Haven came. I will use them for my needsss after you are gone._";

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_What is this ruin?_";
	text1 = "_I don't know. Nobody knowsss. It isss old. I claimed it because it wasss remote and large enough to contain me._";
	text2 = "_The peaksss have many such ruinsss of a forgotten, lost people._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_What lies beyond the ruin?_";
	text1 = "_The highest peaksss of the Rokaj. The Aram Peaksss, where the humansss of the Rokaj come to argue. They have many debatesss on their mountain, none of which interest me._";

begintalknode;
	state = 10;
	nextstate = 15;
	condition = 1;
	question = "_I wish to trade with you._";
	text1 = "_Trade? Now? No. Not when Haven'sss position here isss in question._";

begintalknode;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "_Haven is the power in the Rokaj._";
	text1 = "_Some of the Ro have other ideasss. I will wait to trade until their rebellion isss settled. The Ro are puny, but useful. I won't spoil relationsss with them if I don't have to._";

begintalknode;
	state = 10;
	nextstate = 16;
	condition = 1;
	question = "_Why are you so annoyed?_";
	text1 = "_Because I was misled. The Ro tricked me, and I was foolish enough to be gulled. They will pay, one day._";
	text2 = "_They offered me a deal, and I took it._";

begintalknode;
	state = 16;
	nextstate = 17;
	condition = 1;
	question = "_What was the deal?_";
	text1 = "_Gold and magic. A hearty amount. In return, I am to keep anyone from passing through my gate until all meetingsss on the mountaintop are completed. I wasss supposed to scare off all travelersss. Eat those who defied me._";
	text2 = "_They did not tell me that the [P] of Haven wasss coming. Important information to withhold. I am very angry._";

begintalknode;
	state = 17;
	nextstate = 18;
	condition = 1;
	question = "_Who made this deal with you?_";
	text1 = "_The raidersss and rebelsss hiding in the peaksss of Aram. They sent envoysss, respectful, carrying treasure. They brought an offer from the Wolf._";
	
begintalknode;
	state = 18;
	nextstate = 17;
	condition = 1;
	question = "_Tell me about the Wolf._";
	text1 = "_The leader of the rebelsss. They said nothing about who thisss person wasss. I didn't care. I don't pay attention to the infinite rebellionsss of the Ro. All involved will die of old age in a blink._";

begintalknode;
	state = 17;
	nextstate = 19;
	condition = 1;
	question = "_So you plan to stop me?_";
	text1 = "_I am bound by honor and our deal to try. I must fight you. I am very angry about it. You look puny to my eyesss, unable to survive the trapsss I have created, but I do not want to annoy Haven._";

begintalknode;
	state = 19;
	nextstate = -1;
	condition = 1;
	question = "_I am a [P] of Haven. I do not appreciate being threatened._";
	text1 = "_Of course. You are a proud folk. If I eat you, your Queen will send many assassinsss to my peak to burn and freeze and fail to kill me. Best to avoid thisss._";

begintalknode;
	state = 19;
	nextstate = 20;
	condition = 1;
	question = "_I don't wish to fight you, but I must pass here._";
	text1 = "_Ahhhh. Yessssss. There is a solution. I mussst fight you, but I can fail. The gate out to the east is open. If you could slip past me, what can I do?_ Her shoulder muscles make a mighty shrug.";
	text2 = "_So there is a way past that spares our lives. Stay out of my lair, and prepare to run._";

begintalknode;
	state = 19;
	nextstate = -1;
	condition = 1;
	question = "_You have threatened me, worm. You will die for that._ Attack.";
	text1 = "The dragon is surprised. _You think you can kill me? Fine. I will fight. Learn humility, human!_ She spreads her wings wide and takes in a deep breath.";
	action = END_TALK;
	code =
		set_attitude(5400,10);
	break;
	
begintalknode;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "_You are being very scrupulous about your deals._";
	text1 = "_Dragonsss are proud and strong, but we are not foolsss. We can be killed. Keeping to dealsss makesss usss useful to have around. Thusss, we survive through the agesss._";
	
begintalknode;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "_That doesn't sound appealing._";
	text1 = "Droth'Nrah loses her patience. _I try to help you, and you refuse? Fine! Leave to the south. Go back through the underworld. I don't care! Leave me!_";
	action = END_TALK;
		
begintalknode;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "_Your terms are acceptable._";
	text1 = "Droth'Nrah nods. _I am angry that this trickery is necessary. Still, it isss the best solution._ She waves her wing to the east, in a mocking gesture.";
	text2 = "_Go. Run, little pest. Climb your mountain._";
	action = END_TALK;

	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				